package com.ruiyi.adrobot.mongo.device;

import com.ruiyi.adrobot.beans.Device;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface DeviceRepository extends MongoRepository<Device, String>, DeviceOperations {

    Device findByImei(String imei);

    Device findByModel(String models);

    List<Device> findByModelAndImeiNotIn(String model, List<String> usedImeisById);

    List<Device> findByImeiNotIn(List<String> usedImeisById);

    Long findCountDeviceByModel(String model);

    List<Device> findDevicesByModelAndImeiNotIn(String model, List<String> usedImeis);

    List<Device> findDevicesByImeiNotIn(List<String> usedImeis);

    List<Device> findDevicesByModelAndUsedFunsNot(String model, Integer fun);

    List<Device> findDevicesByUsedFunsNot(Integer fun);
}
